import App from './App.vue'
import router from './router'
import { antComponents } from './antd'
import { CommonComponents } from './use-common-components'
import 'virtual:svg-icons-register'
import store, { storeKey } from './store'
import { createInstance } from '@/root'
import { useDirectives } from './directives'
import '@/styles/index.scss'
import '@/styles/tailwind.scss'
import '@/styles/common.scss'
import plugin from '@/plugins/index'
import autoScrollDirective from '@/directives/autoScroll'
import 'viewerjs/dist/viewer.css'
import VueViewer from 'v-viewer'
// import 'element-plus/theme-chalk/dark/css-vars.css'

const bootstrap = () => {
  const app = createInstance(App)
  app.use(store, storeKey)
  app.use(router)
  app.use(CommonComponents)
  app.use(antComponents)
  app.use(useDirectives)
  app.use(VueViewer)
  app.mount('#hongwan')
  app.directive('auto-scroll', autoScrollDirective)
  plugin(app)
}
bootstrap()
